<?php

namespace App\Vilidate\playlet;

/**
 * user控制器下的验证规则类
 */
class PlayletEpisodesController
{
    public $index = ['rule'=>[], 'msg'=>[]];

    public $view = ['rule'=>[], 'msg'=>[]];

    public $delete = ['rule'=>[], 'msg'=>[]];

    public $examine = [
        'rule'=>[
            'ids' => 'required|array',
        ],
        'msg'=>[
            'ids.required' => 'ID 不能为空',
            'ids.array' => 'ID 应该为数组',
        ]
    ];

    public $create = [
        'rule'=>[
            'playlet_id' => 'required',
            'playlet_number' => 'required',
            'playlet_number_name' => 'required|string',
            'cover' => 'required|url',
            'play_url' => 'required|url',
            'original_play_url' => 'required|url',
        ],
        'msg'=>[
            'playlet_id.required' => '短剧ID不能为空',
            'playlet_number.required' => '集数不能为空',
            'playlet_number_name.string' => '集数名称为字符串',
            'playlet_number_name.required' => '集数名称不能为空',
            'cover.required' => '剧集封面图不能为空',
            'cover.url' => '剧集封面图应该为url',
            'play_url.required' => '剧集视频不能为空',
            'play_url.url' => '剧集视频应该为url',
            'original_play_url.required' => '剧集原视频不能为空',
            'original_play_url.url' => '剧集原视频应该为url',

        ]
    ];
    public $update = [
        'rule'=>[
            'playlet_id' => 'required',
            'playlet_number' => 'required',
            'playlet_number_name' => 'required|string',
            'cover' => 'required|url',
            'play_url' => 'required|url',
            'original_play_url' => 'required|url',
        ],
        'msg'=>[
            'playlet_id' => '短剧ID不能为空',
            'playlet_number.required' => '集数不能为空',
            'playlet_number_name.string' => '剧集名称为字符串',
            'playlet_number_name.required' => '剧集名称不能为空',
            'cover.required' => '剧集封面图不能为空',
            'cover.url' => '剧集封面图应该为url',
            'play_url.required' => '剧集视频不能为空',
            'play_url.url' => '剧集视频应该为url',
            'original_play_url.required' => '剧集原视频不能为空',
            'original_play_url.url' => '剧集原视频应该为url',
        ]
    ];
}